import {user_login} from 'Utils/api/index.js';

const state = {
    toggleVisible: {companyId: ''},
    togglesv: false
}

const mutations = {
    TOGGLE_SLIDER: (state, device) => {
      state.toggleVisible = device
    },
    TOGGLE_VISIBLE: (state, device) => {
        state.togglesv = device
    },
}

const actions = {
    
    login({ commit }, view){
        user_login().then(res=>{
            console.log('ddddd----', res)
            commit('TOGGLE_SLIDER', res.data)
        })
    },
    user_login({ commit }, view){
        commit('TOGGLE_VISIBLE',view)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}